Problem Note 43954: PROC GINSIDE might generate incorrect results
Missing values might be returned for the STATE and COUNTY variables when using the GINSIDE procedure with map data sets such as MAPS.STATES or MAPS.COUNTIES.
The problem is most likely to occur when the map data set contains polygons that are defined with fewer than three points.
To circumvent the problem, remove these invalid polygons from the data. Refer to the Full Code tab for example code.
Operating System and Release Information
SAS System | SAS/GRAPH | z/OS | 9.3 TS1M0 | 9.3 TS1M1 |
Microsoft® Windows® for x64 | 9.3 TS1M0 | 9.3 TS1M1 |
Microsoft Windows Server 2003 Datacenter Edition | 9.3 TS1M0 | 9.3 TS1M1 |
Microsoft Windows Server 2003 Enterprise Edition | 9.3 TS1M0 | 9.3 TS1M1 |
Microsoft Windows Server 2003 Standard Edition | 9.3 TS1M0 | 9.3 TS1M1 |
Microsoft Windows Server 2003 for x64 | 9.3 TS1M0 | 9.3 TS1M1 |
Microsoft Windows Server 2008 | 9.3 TS1M0 | 9.3 TS1M1 |
Microsoft Windows Server 2008 for x64 | 9.3 TS1M0 | 9.3 TS1M1 |
Microsoft Windows XP Professional | 9.3 TS1M0 | 9.3 TS1M1 |
Windows 7 Enterprise 32 bit | 9.3 TS1M0 | 9.3 TS1M1 |
Windows 7 Enterprise x64 | 9.3 TS1M0 | 9.3 TS1M1 |
Windows 7 Home Premium 32 bit | 9.3 TS1M0 | 9.3 TS1M1 |
Windows 7 Home Premium x64 | 9.3 TS1M0 | 9.3 TS1M1 |
Windows 7 Professional 32 bit | 9.3 TS1M0 | 9.3 TS1M1 |
Windows 7 Professional x64 | 9.3 TS1M0 | 9.3 TS1M1 |
Windows 7 Ultimate 32 bit | 9.3 TS1M0 | 9.3 TS1M1 |
Windows 7 Ultimate x64 | 9.3 TS1M0 | 9.3 TS1M1 |
Windows Vista | 9.3 TS1M0 | 9.3 TS1M1 |
Windows Vista for x64 | 9.3 TS1M0 | 9.3 TS1M1 |
64-bit Enabled AIX | 9.3 TS1M0 | 9.3 TS1M1 |
64-bit Enabled HP-UX | 9.3 TS1M0 | 9.3 TS1M1 |
64-bit Enabled Solaris | 9.3 TS1M0 | 9.3 TS1M1 |
HP-UX IPF | 9.3 TS1M0 | 9.3 TS1M1 |
Linux | 9.3 TS1M0 | 9.3 TS1M1 |
Linux for x64 | 9.3 TS1M0 | 9.3 TS1M1 |
Solaris for x64 | 9.3 TS1M0 | 9.3 TS1M1 |
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.
The sample program below illustrates how to remove polygons that are defined with fewer than three points from the map data.
data gps;
input longitude latitude site $;
x=longitude*arcos(-1)/180;
x=x*(-1);
y=latitude*arcos(-1)/180;
datalines;
-77.0348 40.0454 a
-78.4437 39.1623 b
-78.4115 39.3751 c
-78.7646 40.6354 d
;
run;
proc freq data=maps.counties noprint;
tables state*county*segment / out=counts(where=(count < 3));
run;
data counties;
merge maps.counties counts(in=a);
by state county segment;
if a then delete;
run;
proc ginside data=gps map=counties out=gpscounties;
id state county;
run;
proc sort data=gpscounties;
by site;
run;
proc print data=gpscounties;
var site state county x y;
run;
PROC GINSIDE might generate incorrect results when using a map data set containing polygons that are defined with fewer than three points, such as MAPS.STATES or MAPS.COUNTIES.
Type: | Problem Note |
Priority: | medium |
Date Modified: | 2011-09-15 12:01:02 |
Date Created: | 2011-08-10 09:05:48 |